import request from '../request'

/** 接口 */
const Api = {
  getAnswerList: '/api/sys/answer/getAnswerList',
  save: '/api/sys/answer/save',
  remove: '/api/sys/answer/remove',
  getLetterCount: '/api/sys/answer/getLetterCount',
  savComment: '/api/sys/answer/savComment',
}

/** 用户列表 */
export const getAnswerList = data => {
  return request.request({
    url: Api.getAnswerList,
    params: data,
    method: 'GET'
  })
}

/** 保存 */
export const save = data => {
  return request.request({
    url: Api.save,
    data: data,
    method: 'POST'
  })
}

/** 删除 */
export const remove = data => {
  return request.request({
    url: Api.remove,
    params: data,
    method: 'DELETE'
  })
}


/** 获取评论主题内容以及评论 */
export const getLetterCount = data => {
  return request.request({
    url: Api.getLetterCount,
    params: data,
    method: 'GET'
  })
}
/** 保存 */
export const savComment = data => {
  return request.request({
    url: Api.savComment,
    data: data,
    method: 'POST'
  })
}
